Don't restrict the width of the spinbutton entry field to 10 digits.
authorMatthias Clasen <matthiasc@src.gnome.org>
Thu, 18 Oct 2001 20:15:53 +0000 (20:15 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Thu, 18 Oct 2001 20:15:53 +0000 (20:15 +0000)
        * gtk/gtkspinbutton.c (gtk_spin_button_size_request):
        Don't restrict the width of the spinbutton entry field
        to 10 digits. (#58681)

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkspinbutton.c

index 82a1ed5b5988e78f3497b957eedbeffec2b12876..fe7ce6518759539658f9e2c2da8a1d978b4e93f7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2001-10-18  Matthias Clasen  <matthiasc@poet.de>
+
+       * gtk/gtkspinbutton.c (gtk_spin_button_size_request): 
+       Don't restrict the width of the spinbutton entry field 
+       to 10 digits. (#58681)
+
 Thu Oct 18 14:58:14 2001  Jonathan Blandford  <jrb@redhat.com>
 
        * tests/testtreeflow.c: new test program for the tree.
index 82a1ed5b5988e78f3497b957eedbeffec2b12876..fe7ce6518759539658f9e2c2da8a1d978b4e93f7 100644 (file)
@@ -1,3 +1,9 @@
+2001-10-18  Matthias Clasen  <matthiasc@poet.de>
+
+       * gtk/gtkspinbutton.c (gtk_spin_button_size_request): 
+       Don't restrict the width of the spinbutton entry field 
+       to 10 digits. (#58681)
+
 Thu Oct 18 14:58:14 2001  Jonathan Blandford  <jrb@redhat.com>
 
        * tests/testtreeflow.c: new test program for the tree.
index 82a1ed5b5988e78f3497b957eedbeffec2b12876..fe7ce6518759539658f9e2c2da8a1d978b4e93f7 100644 (file)
@@ -1,3 +1,9 @@
+2001-10-18  Matthias Clasen  <matthiasc@poet.de>
+
+       * gtk/gtkspinbutton.c (gtk_spin_button_size_request): 
+       Don't restrict the width of the spinbutton entry field 
+       to 10 digits. (#58681)
+
 Thu Oct 18 14:58:14 2001  Jonathan Blandford  <jrb@redhat.com>
 
        * tests/testtreeflow.c: new test program for the tree.
index 82a1ed5b5988e78f3497b957eedbeffec2b12876..fe7ce6518759539658f9e2c2da8a1d978b4e93f7 100644 (file)
@@ -1,3 +1,9 @@
+2001-10-18  Matthias Clasen  <matthiasc@poet.de>
+
+       * gtk/gtkspinbutton.c (gtk_spin_button_size_request): 
+       Don't restrict the width of the spinbutton entry field 
+       to 10 digits. (#58681)
+
 Thu Oct 18 14:58:14 2001  Jonathan Blandford  <jrb@redhat.com>
 
        * tests/testtreeflow.c: new test program for the tree.
index 82a1ed5b5988e78f3497b957eedbeffec2b12876..fe7ce6518759539658f9e2c2da8a1d978b4e93f7 100644 (file)
@@ -1,3 +1,9 @@
+2001-10-18  Matthias Clasen  <matthiasc@poet.de>
+
+       * gtk/gtkspinbutton.c (gtk_spin_button_size_request): 
+       Don't restrict the width of the spinbutton entry field 
+       to 10 digits. (#58681)
+
 Thu Oct 18 14:58:14 2001  Jonathan Blandford  <jrb@redhat.com>
 
        * tests/testtreeflow.c: new test program for the tree.
index 82a1ed5b5988e78f3497b957eedbeffec2b12876..fe7ce6518759539658f9e2c2da8a1d978b4e93f7 100644 (file)
@@ -1,3 +1,9 @@
+2001-10-18  Matthias Clasen  <matthiasc@poet.de>
+
+       * gtk/gtkspinbutton.c (gtk_spin_button_size_request): 
+       Don't restrict the width of the spinbutton entry field 
+       to 10 digits. (#58681)
+
 Thu Oct 18 14:58:14 2001  Jonathan Blandford  <jrb@redhat.com>
 
        * tests/testtreeflow.c: new test program for the tree.
index 82a1ed5b5988e78f3497b957eedbeffec2b12876..fe7ce6518759539658f9e2c2da8a1d978b4e93f7 100644 (file)
@@ -1,3 +1,9 @@
+2001-10-18  Matthias Clasen  <matthiasc@poet.de>
+
+       * gtk/gtkspinbutton.c (gtk_spin_button_size_request): 
+       Don't restrict the width of the spinbutton entry field 
+       to 10 digits. (#58681)
+
 Thu Oct 18 14:58:14 2001  Jonathan Blandford  <jrb@redhat.com>
 
        * tests/testtreeflow.c: new test program for the tree.
index a767d8899419ece6c6ffeaeb19fb4805a528414d..7be68ce10f63e85dc501b323d95dddbdbd404301 100644 (file)
@@ -583,6 +583,7 @@ gtk_spin_button_size_request (GtkWidget      *widget,
       gint width;
       gint w;
       gint string_len;
+      gint max_string_len;
       gint digit_width;
 
       context = gtk_widget_get_pango_context (widget);
@@ -598,14 +599,16 @@ gtk_spin_button_size_request (GtkWidget      *widget,
       /* Get max of MIN_SPIN_BUTTON_WIDTH, size of upper, size of lower */
       
       width = MIN_SPIN_BUTTON_WIDTH;
+      max_string_len = MAX (10, compute_double_length (1e9 * spin_button->adjustment->step_increment,
+                                                       spin_button->digits));
 
       string_len = compute_double_length (spin_button->adjustment->upper,
                                           spin_button->digits);
-      w = MIN (string_len, 10) * digit_width;
+      w = MIN (string_len, max_string_len) * digit_width;
       width = MAX (width, w);
       string_len = compute_double_length (spin_button->adjustment->lower,
                                          spin_button->digits);
-      w = MIN (string_len, 10) * digit_width;
+      w = MIN (string_len, max_string_len) * digit_width;
       width = MAX (width, w);
       
       requisition->width = width + ARROW_SIZE + 2 * widget->style->xthickness;